import requests
import json

if __name__ == '__main__':
    keyword = input('enter a key:')
    url = 'http://www.kfc.com.cn/kfccda/ashx/GetStoreList.ashx'
    headers = {
        'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36 Edg/89.0.774.68'
    }
    params = {
        'op': 'keyword',
        'cname': '',
        'pid': '',
        'keyword': keyword,
        'pageIndex': '1',
        'pageSize': '10'
    }
    responce = requests.post(url=url, params=params, headers=headers)
    text = responce.json()
    print(text)
    # print(responce)
    








